package com.springboot.demo.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.springboot.demo.entity.Record;
import com.springboot.demo.mapper.RBorrowRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.UnsupportedEncodingException;
import java.util.List;

@Service
public class RBorrowRecordService extends ServiceImpl<RBorrowRecordMapper, Record> {

    @Autowired
    private RBorrowRecordMapper rBorrowRecordMapper;
    public List<Record> getPhone(String phonenum) throws UnsupportedEncodingException {
        String phone=new String(phonenum.getBytes("8859_1"), "utf8");
        List<Record> list1=rBorrowRecordMapper.getPhone1(phone);
        List<Record> list2=rBorrowRecordMapper.getPhone2(phone);
        list1.addAll(list2);
        return list1;
    }
}